Skip to content

Replace kcd-scripts prettier#416

Merged
JimMadge merged 25 commits intoall-contributors:mainfrom
JimMadge:prettier
Feb 3, 2026
Merged

Replace kcd-scripts prettier#416
JimMadge merged 25 commits intoall-contributors:mainfrom
JimMadge:prettier

Conversation

@JimMadge
Copy link
Member

@JimMadge JimMadge commented Jan 29, 2026

Closes #415
Depends on #402

This copies the kcd-scripts prettier config into the repo.
This did result in some changes to the source files but the rules don't seem to conflict with eslint so I think it is fine if we are happy with the style.

I put the prettier config in an rc file. I'm not sure if there is much advantage to having an mjs file instead. We could switch if we want to do something more complex.

I presume eslint-config-prettier is doing it's job. That is configured in eslint.config.mjs, but I don't really understand what is going on in that file.

@JimMadge JimMadge marked this pull request as ready for review February 3, 2026 20:45
Copy link
Contributor

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blockers from me, this is nice and clean!

Only a couple of suggestions that I think might be better as followups. No preference on my end.

@JoshuaKGoldberg
Copy link
Contributor

eslint-config-prettier

Linking & recapping #402 (comment): its job (disabling ESLint rules that conflict with Prettier) is no longer necessary. 🔪

@JimMadge
Copy link
Member Author

JimMadge commented Feb 3, 2026

eslint-config-prettier

Linking & recapping #402 (comment): its job (disabling ESLint rules that conflict with Prettier) is no longer necessary. 🔪

Oh, so does that mean we can get rid of the dependency all together? I feel in the last 30 minutes I've learned a lot about Husky, Prettier, Lint Staged and ESLint for npm packages 😆. The Prettier docs suggested conflicts with ESLint can happen so you should use that package and be careful in which order you call them.

@JoshuaKGoldberg
Copy link
Contributor

Oh, so does that mean we can get rid of the dependency all together?

Yup! Unless something regressed in 2025, eslint-config-prettier should no longer practically have any impact with the way we use it.

The Prettier docs suggested conflicts with ESLint can happen so you should use that package and be careful in which order you call them.

Oh, where did you see this? They might need updating to note that this is typically only true for custom and/or legacy configs.

@JimMadge
Copy link
Member Author

JimMadge commented Feb 3, 2026

Oh, where did you see this? They might need updating to note that this is typically only true for custom and/or legacy configs.

Recommendation for installing eslint-config-prettier here. And, warning about order of ESLint and Prettier in pre-commit hooks here

@JimMadge JimMadge merged commit d96e0ef into all-contributors:main Feb 3, 2026
2 checks passed
@JoshuaKGoldberg
Copy link
Contributor

Oof thanks! Filed: prettier/prettier#18859

@JimMadge JimMadge deleted the prettier branch February 6, 2026 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prettier config: uses kcd-scripts/dist/config/prettierrc

3 participants